export { }

type T1 = { name: number, getName: () => string };



type T2<N, G> = { name: N, getName: () => G }
let objType: T1 = {
    name: 1,
    getName() {
        return '';
    }
}

let objType2: T2<string, number> = {
    name: "2",
    getName() {
        return 1;
    }
}


//泛型 接口

interface I1<N, G> {
    name: N,
    getName: () => G
}

let objType3: I1<string, number> = {
    name: "3",
    getName() {
        return 1;
    }
}   